package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.MyPersonBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class MyFriendsMethods extends BaseMethods {

    private static MyFriendsMethods m_ins = null;

    public static MyFriendsMethods getInstance() {
        if (m_ins == null) {
            synchronized (MyFriendsMethods.class) {
                if (m_ins == null) {
                    m_ins = new MyFriendsMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Friend/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void my_friend(Subscriber<MyPersonBean> subscriber,
                     int uid,String hashid ,int page ) {
        Observable observable = initService().my_friend(System.currentTimeMillis()+"",
                "1522546fb8e6c8b6c2d37837e99d0730",uid,hashid,page
        );
        toSubscribe(observable, subscriber);
    }
}
